#include<stdio.h>

int find_char(const char*str,const char ch)
{ 
 const char*p;
 for(p=str;*p!='\0';p++){
 if(*p==ch)
 return p-str+1;
}
return -1;

}

int main()
{ 
 char str[100],ch;
 printf("Input str:\n");
 gets(str);
 printf("Input ch:\n");
 ch=getchar();
 printf("position=%d\n",find_char(str,ch));
 return 0;
}
